package org.cloud.mall;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * API网关
 */
@EnableZuulProxy
@SpringBootApplication
public class ZuulApplication {

    private static Logger LOGGER = LoggerFactory.getLogger(ZuulApplication.class);

    public static void main(String[] args) {
        LOGGER.info("=========================== 开始启动 zuul 网关服务 ===========================");

        SpringApplication.run(ZuulApplication.class, args);

        //Scanner scanner = new Scanner(System.in);
        //String port = scanner.nextLine(); //让用户指定端口号
        //new SpringApplicationBuilder(ZuulApplication.class).properties("server.port=" + port).run(args);

        LOGGER.info("===========================  网关服务 启动成功 ===========================");
    }
}
